package lab01;

public class Test12 {
    public static void main(String[] args) {
        int units;
        int tens;
        int hundreds;
        for (int i = 100; i < 1000; i++) {
            units = i % 10;
            tens = i / 10 % 10;
            hundreds = i / 100 % 10;
            if (i == hundreds * hundreds * hundreds + tens * tens * tens +
                    units * units * units) {
                System.out.println("水仙花数是：" + i);
            }

        }

    }
}
